﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using POSSystem.BLL;
using WebUI.Controls;

namespace WebUI.EditPages
{
    public partial class ItemHitsViewer : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
        }

        protected void btnSearch_OnClick(object sender, EventArgs e)
        {
            View_ItemHists viewItemHists = null;
            //if (custID > 0)
            //    ivc = View_Invoices.GetInvoiceByCustID(custID, txtSearch.Text);
            //else
            viewItemHists = View_ItemHists.GetItemHistsList(txtSearch.Text);
            //ivc.Sort = View_Invoices.ColumnNames.CreatedDate + " desc";
            itemHistoryList.SourceObject = viewItemHists;
            itemHistoryList.SortExpression = View_ItemHists.ColumnNames.SavedDate;
            itemHistoryList.SortDirection = BaseListControl.SORT_DESC;
            itemHistoryList.Refresh();
        }
    }
}